package dms;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;

import db.Dao;

public class Test {
	public static void main(String[] args) throws SQLException {
		Connection conn = Dao.getConnection(0);
		DatabaseMetaData dbMD = conn.getMetaData();
		System.out.println(dbMD);
		int i=0;
		ResultSet rs=dbMD.getTables(conn.getCatalog(), "dms", null, new String[] { "TABLE", "VIEW" });
		while(rs.next()){
			String table=rs.getString(3);
			System.out.println(table);
			i++;
			if(i>100)
				break;
		}
	}

}
